<form name="addUser" method="post" action="" enctype="multipart/form-data" onsubmit="return checkInput();">
	<table border="0" cellpadding="0" cellspacing="0" id="id-form">

		<p>
			<span style="color: red;">
			<strong>
			All fields * are required
			</strong> 
			</span>
		</p>
		
		<br/>

		<tr>

			<th valign="top">Username *</th>

			<td><input type="text" name="username" value="{user_val}" class="inp-form" {disable} /></td>
			<td>
				<div class="error-left"></div>
				<div class="error-inner"></div>
			</td>
		</tr>

		<tr>

			<th valign="top">Password </th>

			<td><input type="text" name="password" value="{pass_val}" class="inp-form" />
			</td>
			<td>
				<div class="error-left"></div>
				<div class="error-inner"></div>
			</td>
		</tr>

		<tr>
			<th valign="top">Default Tablespace:</th>
			<td>
			<select name="defTablespace" class="styledselect_form_1" value="All">
					{manuDefOption}
			</select>
			</td>
			<td>
				<div class="error-left"></div>
				<div class="error-inner"></div>
			</td>
		</tr>

		<tr>
			<th valign="top">Temporary Tablespace:</th>
			<td>
			<select name="tempTablespace" class="styledselect_form_1" value="All">
					{manuTemOption}
			</select>
			</td>
			<td>
				<div class="error-left"></div>
				<div class="error-inner"></div>
			</td>
		</tr>

		<tr>
			<th valign="top">Quota(MB):</th>

			<td><input type="text" name="quota" value="{quo_val}" class="inp-form" /></td>
			
			<td>
				<div class="error-left"></div>
				<div class="error-inner"></div>
			</td>
		</tr>
		<tr>
			<th valign="top">Account Status :</th>
			<td >
				<select name="account" class="styledselect_form_1" value="All" >
  					<option value="LOCK" {lock} >LOCK</option>
  					<option value="UNLOCK" {unlock} >UNLOCK</option>
  				</select>
			</td>
		</tr>
		<tr>
			<th valign="top">Profile:</th>

			<td>
			<select name="profile" class="styledselect_form_1" value="All">

					{manuProfOption}

			</select>
			</td>
			<td>
				<div class="error-left"></div>
				<div class="error-inner"></div>
			</td>
		</tr>
		
		<tr>

			<th>&nbsp;</th>

			<td valign="top">

				<input name ="submit" type="submit" value="" class="form-submit" />

				<input name ="reset" type="reset" value="" class="form-reset"  />

			</td>

			<td></td>

		</tr>
		
	</table>
</form>

<script>
	$(document).ready(function(){
		$(".error-inner").each(function(){
			if($(this).html() == '') {
				$(this).css("visibility", "hidden");
				$(this).siblings(".error-left").css("visibility", "hidden");
			}
		});
	});
	
	$(document).ready(function(){
		
	 	$('form[name="addUser"]').validate({
	    	rules: {
				username: { required: true},
				quota: { digits: true},
			},
			errorPlacement: function(error, element){
				$(element).parents('td').next().children(".error-inner").html(error);
										        
		        				
			},
			highlight: function(element, errorClass) {				
				$(element).parents('td').next().children(".error-left, .error-inner").css("visibility", "visible");
				
			},
			unhighlight: function(element, errorClass) {
				$(element).parent('td').next().children(".error-left, .error-inner").css("visibility", "hidden");
				
			}
		    
		});
	});
	
</script>